package cn.lbw.spider.monitor.controller;

import cn.lbw.spider.monitor.bean.Hello;
import cn.lbw.spider.monitor.service.IHello;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;

/**
 * Created by lzd on 2017/3/28.
 */

@Controller
public class HelloController {

    @Resource
    IHello hello;

    @RequestMapping("hello")
    public String hello(ModelMap map) {
        System.out.println("hello , 进来了");
        map.put("key" , "hello , world!");
        return  "hello";
    }

    @RequestMapping("hello2")
    public String hello2(ModelMap map) {
        System.out.println("hello2 , 进来了");
        map.put("key" , hello.test());

        return  "hello";
    }
}
